window.onload=function(){
    //获取url地址
    let url = window.location.href;
    let paramStr = url.split('?')[1];
    let paramArr = paramStr.split('&');
    let paramObj = {};
    for (let i = 0; i < paramArr.length; i++) {
        let p_item = paramArr[i];
        paramObj[p_item.split('=')[0]] = p_item.split('=')[1]
    }
    console.log(paramObj);

}